﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using DreamBuilder.Core.AOP.Attribute;


namespace DreamBuilder.UI.UserControls.DataAccess.Services
{

    public abstract class AttachmentDAL : UserControlsDataAccessBase
    {
        abstract public string AttachmentDBHelperString { get; set; }
        abstract public void SaveAttachment(string fileName, Byte[] attachmentContent, string attachmentID, 
                                                DateTime uploadTime, string documentType, Hashtable addInfos);
        abstract public DataTable GetAttachmentList(string objectID, string objectTableName, string addListValue, string deleteListValue, string FunctionID);
        abstract public DataTable GetAttachmentByID(string attachmentID);
        [Transaction]
        abstract public void ClearExpireAttachment();

        /// <summary>
        /// 判断是否存在附件
        /// </summary>
        /// <param name="tableCode">表名</param>
        /// <param name="pkValue">主键值</param>
        /// <returns></returns>
        abstract public bool HaveAttachments(string tableCode, string pkValue);

        abstract public DataTable GetSaveDataTable(string ObjectID, string ObjectTableName, string addListValue, string deleteListValue);
    }
}